//
//  shipListCell.m
//  WHB_logist
//
//  Created by 徐国庆 on 15/12/2.
//  Copyright (c) 2015年 turing. All rights reserved.
//

#import "shipListCell.h"

@implementation shipListCell

- (void)awakeFromNib {
    // Initialization code
    // 备注下的空白
    self.lineLabel = [[UILabel alloc] init];
    self.lineLabel.layer.borderWidth = 0.5;
    [self.contentView addSubview:self.lineLabel];
    
    // “备注”
    self.remarkLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, self.vehicle.frame.origin.y + self.vehicle.frame.size.height + 50, 90, 30)];
    self.remarkLabel.text = @"备注:";
    self.remarkLabel.textAlignment = 2;
    [self.contentView addSubview:self.remarkLabel];
    
    // “备注信息”
    self.remarkInfoLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.remarkLabel.frame.origin.x + self.remarkLabel.frame.size.width + 20, self.remarkLabel.frame.origin.y, self.contentView.frame.size.width - self.remarkLabel.frame.origin.x - self.remarkLabel.frame.size.width, 40)];
    self.remarkInfoLabel.textAlignment = 0;
    self.remarkInfoLabel.text = @"张三沉睡";
    [self.contentView addSubview:self.remarkInfoLabel];

    // “订货状态”
    self.orderState = [[UILabel alloc] initWithFrame:CGRectMake(10, self.remarkLabel.frame.origin.y + self.remarkLabel.frame.size.height, 90, 30)];
    self.orderState.text = @"订货状态:";
    self.orderState.textAlignment = 2;
    [self.contentView addSubview:self.orderState];

    // 取货完成
    self.receiveShip = [UIButton buttonWithType:UIButtonTypeCustom];
    self.receiveShip.frame = CGRectMake(20, self.orderState.frame.origin.y + self.orderState.frame.size.height + 10, (self.contentView.frame.size.width - 150) / 2, 40);
    [self.receiveShip setTitle:@"取货完成" forState:UIControlStateNormal];
    self.receiveShip.layer.masksToBounds = YES;
    self.receiveShip.layer.cornerRadius = 5;
    [self.contentView addSubview:self.receiveShip];
    
    // 拨打电话
    self.callPhone = [UIButton buttonWithType:UIButtonTypeCustom];
    self.callPhone.frame = CGRectMake((self.contentView.frame.size.width - 50) / 2, self.orderState.frame.origin.y + self.orderState.frame.size.height + 10, (self.contentView.frame.size.width - 150) / 2, 40);
    [self.callPhone setTitle:@"拨打电话" forState:UIControlStateNormal];
    self.callPhone.layer.masksToBounds = YES;
    self.callPhone.layer.cornerRadius = 5;
    [self.contentView addSubview:self.callPhone];
    
    // 实时位置图标
    self.wwscImage = [[UIImageView alloc] initWithFrame:CGRectMake(5, (self.chact.frame.size.height - 17 / 2.0) / 2.0 - 3, 17 / 2.0, 23 / 2.0)];
    self.wwscImage.image = [UIImage imageNamed:@"sswz"];
    [self.chact addSubview:self.wwscImage];
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)button:(id)sender {
}
@end
